package io;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.nio.charset.StandardCharsets;

public class ReadStringDemo {
    public static void main(String[] args) throws IOException {
        FileInputStream fis = new FileInputStream("fos.txt");
        byte[] bytes = new byte[1024*10];
        int len = fis.read(bytes);
        String line = new String(bytes,0,len, StandardCharsets.UTF_8);
        System.out.println(line);
    }
}
